const Mock = require('mockjs')

const data = Mock.mock({
  'items|6': [{
    max: '@integer(50000,60000)',
    name: '@ctitle(2,5)'
  }],
  'View': {
    'xAxis|6': ['@integer(2000, 50000)'],
    'yAxis|6': ['@integer(5000, 50000)']
  }
})

module.exports = [
  {
    url: '/vue-admin-template/radar',
    type: 'get',
    response: config => {
      const items = data.items
      const view = data.View
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items,
          view: view
        }
      }
    }
  }
]
